package com.example.lifecycle.ProcessLifeCycle;

import android.util.Log;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;

public class MyProcessLifeCycle implements LifecycleObserver {

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    public void onCreate() {
        Log.d("guaimiao", "MyApplication onCreate");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    public void onStart() {
        Log.d("guaimiao", "MyApplication onStart");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public void onResume() {
        Log.d("guaimiao", "MyApplication onResume");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    public void onPause() {
        Log.d("guaimiao", "MyApplication onPause");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    public void onStop() {
        Log.d("guaimiao", "MyApplication onStop");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    public void onDestroy() {
        Log.d("guaimiao", "MyApplication onDestroy");
    }

}
